#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main() {
    int n;
    scanf("%d", &n);

    int count = 0;
    for (int i = 2; i < n; ++i)
    {
        int j = 0;
        for (j = 2; j < i; ++j)
        {
            if (0 == i % j)
            {
                break;
            }
        }
        if (j == i)
            ++count;
    }
    printf("%d", count);

    return 0;
}